package com.sg.dto.biz.app.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;


/**
 * @desc ChangeColumnDto
 * @使用场景
 */
@Data
public class ChangeColumnDto extends BaseDto implements Serializable {

    /**
     * 变更字段英文名
     */
    @NotNull(message = "变更字段英文名不能为空")
    @ApiModelProperty("变更字段英文名")
    private String objectPropertyCode;

    /**
     * 变更字段行为日志名称
     */
    @NotNull(message = "变更字段行为日志名称不能为空")
    @ApiModelProperty("变更字段行为日志名称")
    private String objectPropertyName;

    /**
     * 变更字段内容
     */
    @NotNull(message = "变更字段内容不能为空")
    @ApiModelProperty("变更字段内容")
    private String metaDataColumnContent;

    /**
     * 原始字段中文内容
     */
    @NotNull(message = "原始字段中文内容不能为空")
    @ApiModelProperty("原始字段中文内容")
    private String oriColumnContent;

    /**
     * 变更字段中文内容
     */
    @NotNull(message = "变更字段中文内容不能为空")
    @ApiModelProperty("变更字段中文内容")
    private String columnContent;
    /**
     * 内容表主键ID
     */
    @NotNull(message = "内容表主键ID不能为空")
    @ApiModelProperty("内容表主键ID")
    private String entityId;
    /**
     * 自定义字段
     */
    @NotNull(message = "自定义字段不能为空")
    @ApiModelProperty("自定义字段")
    private String customField;

    /**
     * 自定义字段1
     */
    @NotNull(message = "自定义字段1不能为空")
    @ApiModelProperty("自定义字段1")
    private String customField1;
    /**
     * 关联目标内容ID
     */
    @NotNull(message = "关联目标内容ID不能为空")
    @ApiModelProperty("关联目标内容ID")
    private String targetCycleContentId;

    /**
     * 被评对象目标周期ID
     */
    @NotNull(message = "被评对象目标周期ID不能为空")
    @ApiModelProperty("被评对象目标周期ID")
    private String evaObjTargetCycleId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        ChangeColumnDto that = (ChangeColumnDto) o;
        return objectPropertyCode == that.objectPropertyCode && objectPropertyName == that.objectPropertyName && metaDataColumnContent == that.metaDataColumnContent && oriColumnContent == that.oriColumnContent && columnContent == that.columnContent && entityId == that.entityId && customField == that.customField && customField1 == that.customField1 && targetCycleContentId == that.targetCycleContentId && evaObjTargetCycleId == that.evaObjTargetCycleId;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), objectPropertyCode, objectPropertyName, metaDataColumnContent, oriColumnContent, columnContent, entityId, customField, customField1, targetCycleContentId, evaObjTargetCycleId);
    }


}
   